<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>全选/反选/多选</title>
    <link rel="stylesheet" href="./css/style.css" />
  </head>
  <body>
    <div id="app">
      <div class="row"  >
        <div class="relatedInstance" >
          <ul >
            <li id="" v-for="(item,key) in entities" :key="key" >
              <div class="tabItem" >
                <input type="checkbox"  v-model="kk" @click="yu" />
                <span> {{item.text}} </span>
              </div>
              <ul >
                <li v-for="(item1,key1) in item.child" :key="key1"><input type="checkbox" v-model="item.falg" @click="liu" /><span>{{item1.text}}</span></li>
              </ul>
            </li>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <script src="./js/vue.js"></script>
    <script>
      var newlist = new Vue({
        el: "#app",
        data: {
          kk:false,
          entities: [
            {
              text: "人员",
              falg:false,
              child: [
                { text: "第一组01" },
                { text: "第一组02" },
                { text: "第一组03" },
                { text: "第一组04" },
                { text: "第一组05" },
              ],
            },
            {
              text: "项目",
              child: [{ text: "第二组01" }, { text: "第二组02" }],
            },
            {
              text: "机构",
              child: [
                { text: "第三组01" },
                { text: "第三组02" },
                { text: "第三组03" },
                { text: "第三组04" },
              ],
            },
          ],
        },
        methods: {
          liu(){
              this.falg=!this.falg
          },
          yu(){
              this.entities.filter(item=>{
 
              })
          }
        },
      });
    </script>
  </body>
</html>
